#!/usr/bin/perl -w
#
# Copyright(c) Plink Limited 2010. All rights reserved.
#
# $Header:$
#
# $Log:$
# 
# Author:      Jeremy Banks
#
# Description: Hold application settings
#

#----------------------------------------------------------------------
# External Modules
#----------------------------------------------------------------------

package XMLTV::Settings;

use strict;

use XMLTV::Updater;

#---------------------------------------------------------------------------
# Globals
#---------------------------------------------------------------------------

my $log_dir = "log";
my $backup_dir = "backup";
my $marker_file = "xmltv_markers.xml";
my $rss_feed;

#---------------------------------------------------------------------------
# Get the marker file name
#---------------------------------------------------------------------------

sub marker_file
{
   return $marker_file;
}

#---------------------------------------------------------------------------
# Get the log directory
#---------------------------------------------------------------------------

sub log_dir
{
   return $log_dir;
}

#---------------------------------------------------------------------------
# Get the backup directory
#---------------------------------------------------------------------------

sub backup_dir
{
   return $backup_dir;
}

#---------------------------------------------------------------------------
# Get or set the rss feed
#---------------------------------------------------------------------------

sub rss_feed
{
   my $val = shift;
   if ($val)
   {
      $rss_feed = $val;
      XMLTV::Updater->check_for_update();
   }
   return $rss_feed;
}

1;
